package com.mymusic.wangyiMusicBackend.bean;

public class ResultUtil {
    private int code;
    private String msg;
    private Object data;

    public ResultUtil(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public ResultUtil() {
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static ResultUtil success(Object data){
        return new ResultUtil(200, "ok",data);
    }
    public static ResultUtil fail(int code,String msg) {return new ResultUtil(code, msg,null);}

}
